package geo3D;

import java.util.HashSet;
import java.util.Iterator;

public class Vertex extends Point3D {
	private HashSet<Vertex> neighbours=new HashSet<Vertex>();
	private boolean istraced=false; 

	/**
	 * @return the istraced
	 */
	public boolean isIstraced() {
		return istraced;
	}

	/**
	 * @param istraced the istraced to set
	 */
	public void setIstraced(boolean istraced) {
		this.istraced = istraced;
	}

	public Vertex(double x, double y, double z) {
		super(x, y, z);
	}
	
	public void setNeighbour(Vertex v){
		neighbours.add(v); 
	}
	public Iterator<Vertex> getIterator(){
		return neighbours.iterator(); 	
}
	public boolean isNeighbours(Vertex v){
		return neighbours.contains(v);
	}

	public int nbNeighbours() {
		return neighbours.size();
	}
}